package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StoreEmployeeCommissionSettingMapper;
import com.ruoyi.system.domain.StoreEmployeeCommissionSetting;
import com.ruoyi.system.service.IStoreEmployeeCommissionSettingService;

/**
 * 门店员工提成设置，按门店配置多种提成规则Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class StoreEmployeeCommissionSettingServiceImpl implements IStoreEmployeeCommissionSettingService
{
    @Autowired
    private StoreEmployeeCommissionSettingMapper storeEmployeeCommissionSettingMapper;

    /**
     * 通过id查询门店员工提成设置
     *
     * @param id 门店员工提成设置，按门店配置多种提成规则主键
     * @return 门店员工提成设置，按门店配置多种提成规则
     */
    @Override
    public StoreEmployeeCommissionSetting selectStoreEmployeeCommissionSettingById(Long id)
    {
        return storeEmployeeCommissionSettingMapper.selectStoreEmployeeCommissionSettingById(id);
    }

    /**
     * 查询门店员工提成设置列表
     *
     * @param storeName 门店名称
     * @return 门店员工提成设置，按门店配置多种提成规则
     */
    @Override
    public List<StoreEmployeeCommissionSetting> selectStoreEmployeeCommissionSettingListByName(String storeName)
    {
        return storeEmployeeCommissionSettingMapper.selectStoreEmployeeCommissionSettingListByName(storeName);
    }

    /**
     * 新增门店员工提成设置
     *
     * @param storeEmployeeCommissionSetting 门店员工提成设置，按门店配置多种提成规则
     * @return 结果
     */
    @Override
    public int insertStoreEmployeeCommissionSetting(StoreEmployeeCommissionSetting storeEmployeeCommissionSetting)
    {
        return storeEmployeeCommissionSettingMapper.insertStoreEmployeeCommissionSetting(storeEmployeeCommissionSetting);
    }

    /**
     * 修改门店员工提成设置
     *
     * @param storeEmployeeCommissionSetting 门店员工提成设置，按门店配置多种提成规则
     * @return 结果
     */
    @Override
    public int updateStoreEmployeeCommissionSetting(StoreEmployeeCommissionSetting storeEmployeeCommissionSetting)
    {
        return storeEmployeeCommissionSettingMapper.updateStoreEmployeeCommissionSetting(storeEmployeeCommissionSetting);
    }

    /**
     * 通过id批量删除门店员工提成设置信息
     *
     * @param ids 需要删除的门店员工提成设置，按门店配置多种提成规则主键
     * @return 结果
     */
    @Override
    public int deleteStoreEmployeeCommissionSettingByIds(Long[] ids)
    {
        return storeEmployeeCommissionSettingMapper.deleteStoreEmployeeCommissionSettingByIds(ids);
    }

    /**
     * 通过id删除门店员工提成设置信息
     *
     * @param id 门店员工提成设置，按门店配置多种提成规则主键
     * @return 结果
     */
    @Override
    public int deleteStoreEmployeeCommissionSettingById(Long id)
    {
        return storeEmployeeCommissionSettingMapper.deleteStoreEmployeeCommissionSettingById(id);
    }
}
